import { View, Image, Text } from "@tarojs/components";
import { FC } from "@tarojs/taro";
import { HIcon } from "@/components";
import styles from "./index.module.less";
import { useState } from "react";
const Item: FC = () => {
  const [isStar, setIsStar] = useState(false);
  return (
    <View className={styles["item-wrapper"]}>
      <View className={styles["left"]}>
        <Image
          mode="widthFix"
          className={styles["touxiang"]}
          src={require("../../../../assets/img/touxiang.png")}
        ></Image>
      </View>
      <View className={styles["right"]}>
        <View className={styles["name"]}>编号001</View>
        <View className={styles["content"]}>更新了相册</View>
        <Image
          mode="widthFix"
          className={styles["img"]}
          src={require("../../../../assets/img/people.png")}
        ></Image>
        <View className={styles["time"]}>2021-01-01 10:34:34</View>
        <View className={styles["op"]}>
          <View className={styles["ii"]} onClick={() => setIsStar(!isStar)}>
            <HIcon
              className={styles["icon"]}
              type={isStar ? "aixin1" : "aixin"}
              size={34}
            ></HIcon>
            <Text>{isStar ? "已点赞" : "0点赞"}</Text>
          </View>
          <View className={styles["ii"]}>
            <HIcon className={styles["icon"]} type="pinglun"></HIcon>
            <Text>0评论</Text>
          </View>
          <View className={styles["lianxi"]}>
            <HIcon className={styles["icon"]} type="aixin" size={28}></HIcon>
            <Text>联系TA</Text>
          </View>
        </View>
      </View>
    </View>
  );
};

export default Item;
